﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BuildMenuAdmin.aspx.cs" Inherits="SES.CMS.AdminCP.BuildMenuAdmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="DevExpress.Web.ASPxTreeList.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTreeList" TagPrefix="dxwtl" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="Ajax" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
        <title>Chọn Danh mục</title>
    <script type="text/javascript">
        function ReturnToParentPage() {
            var parentWindow = window.parent;
            parentWindow.SelectAndClosePopup(txtGetLink.GetValue());
        }
        function ReturnToParentPageCancel() {
            var parentWindow = window.parent;
            parentWindow.ClosePopup();
        }
    </script>
    <link href="css/Popup.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
         <div class="pmenu-wrap">
            <div class="menu-step-1">
                <div class="menu-s1-row">
                    <span>- Chọn trang </span>
                    <div class="menu-s1-language">
                        <asp:DropDownList runat="server" ID="ddlPage" AppendDataBoundItems="true" CssClass="ddl-input" DataTextField="Name" DataValueField="MenuAdminID"
                            AutoPostBack="true" OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                            <asp:ListItem Value="0" Text=".: Không chọn :."></asp:ListItem>
                            
                        </asp:DropDownList>
                    </div>
                </div>
            </div>
            
            <%--<div runat="server" id="divProductCategory" visible="false" class="pmenu-row-link">
                <dxwtl:ASPxTreeList ID="tlProductCategory" runat="server" AutoGenerateColumns="False"
                    Width="90%" ClientInstanceName="tlProductCategory" KeyFieldName="ProductCategoryID"
                    ParentFieldName="ParentID" EnableCallbacks="False" OnStartNodeEditing="tlProductCategory_StartNodeEditing">
                    <SettingsPager Mode="ShowPager" PageSize="50">
                        <AllButton Text="Tất cả">
                        </AllButton>
                        <NextPageButton Text="Tiếp theo &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Trước">
                        </PrevPageButton>
                    </SettingsPager>
                    <SettingsBehavior AllowFocusedNode="True" />
                    <SettingsPager ShowDefaultImages="False">
                        <AllButton Text="Tất cả">
                        </AllButton>
                        <NextPageButton Text="Tiếp theo &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Trước">
                        </PrevPageButton>
                    </SettingsPager>
                    <Columns>
                        <dxwtl:TreeListTextColumn FieldName="LoaiSanPhamID" Name="clCategoryID" Visible="False"
                            VisibleIndex="0">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Tên loại sản phẩm" Width="40%" FieldName="ProductCategoryTitle"
                            Name="clTenLoaiSanPham" VisibleIndex="0">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Mã loại sản phẩm" Width="20%" Name="clMaLoaiSanPham"
                            VisibleIndex="1" FieldName="ProductCategoryCode">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Mô tả" Width="20%" FieldName="Description" Name="clMoTa"
                            VisibleIndex="2">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Thứ tự" Width="10%" FieldName="OrderID" Name="clOrderID"
                            VisibleIndex="3">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListCommandColumn Caption="Sửa" VisibleIndex="4">
                            <EditButton Text="Chọn" Visible="True">
                            </EditButton>
                        </dxwtl:TreeListCommandColumn>
                    </Columns>
                </dxwtl:ASPxTreeList>
            </div>--%>
           <%-- <div runat="server" id="divCategory" visible="false" class="pmenu-row-link">
                <div class="menu-step-1">
                    <div class="menu-s1-row">
                        <span>- Chọn danh mục tin tức </span>
                    </div>
                </div>
                <dxwtl:ASPxTreeList ID="tlCategory" runat="server" AutoGenerateColumns="False" Width="100%"
                    ClientInstanceName="tlCategory" KeyFieldName="CategoryID" ParentFieldName="ParentID"
                    EnableCallbacks="False" OnStartNodeEditing="tlCategory_StartNodeEditing" SettingsEditing-AllowRecursiveDelete="true">
                    <SettingsPager Mode="ShowPager" PageSize="30">
                        <AllButton Text="Tất cả">
                        </AllButton>
                        <NextPageButton Text="Tiếp theo &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Trước">
                        </PrevPageButton>
                    </SettingsPager>
                    <SettingsBehavior AllowFocusedNode="True" />
                    <SettingsPager ShowDefaultImages="False">
                        <AllButton Text="Tất cả">
                        </AllButton>
                        <NextPageButton Text="Tiếp theo &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Trước">
                        </PrevPageButton>
                    </SettingsPager>
                    <Columns>
                        <dxwtl:TreeListTextColumn FieldName="CategoryID" Name="clCategoryID" Visible="False"
                            ReadOnly="true" VisibleIndex="0">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Tiêu đề" Width="70%" Name="Title" VisibleIndex="0"
                            ReadOnly="true" FieldName="Title">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Ngôn ngữ" Width="10%" FieldName="Language" Name="clIsNgonNgu"
                            ReadOnly="true" VisibleIndex="1">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Hiển thị" Width="10%" FieldName="IsPublish" Name="clIsPublish"
                            ReadOnly="true" EditCellStyle-Border-BorderWidth="0" VisibleIndex="2">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListTextColumn Caption="Thứ tự" Width="10%" FieldName="OrderID" Name="clOrderID"
                            ReadOnly="true" VisibleIndex="3">
                        </dxwtl:TreeListTextColumn>
                        <dxwtl:TreeListCommandColumn Caption="Thao tác" VisibleIndex="4" EditButton-Visible="true"
                            UpdateButton-Visible="false">
                            <EditButton Text="Chọn" Visible="True">
                            </EditButton>
                        </dxwtl:TreeListCommandColumn>
                    </Columns>
                </dxwtl:ASPxTreeList>
            </div>--%>
           <%-- <div runat="server" id="divArticle" visible="false" class="pmenu-row-link">
                <div class="menu-step-1">
                    <div class="menu-s1-row">
                        <span>- Chọn danh mục </span>
                        <asp:DropDownList ID="cboCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cboCategory_SelectedIndexChanged"
                            CssClass="ddl-input" AppendDataBoundItems="true">
                            <asp:ListItem Value="0" Text=".: Không chọn :."></asp:ListItem>
                        </asp:DropDownList>
                    </div>
                </div>
                <asp:GridView ID="gvAt" DataKeyNames="ArticleID" runat="server" AutoGenerateColumns="False"
                    CssClass="tstyle1" OnSelectedIndexChanged="gvAt_SelectedIndexChanged" Width="100%"
                    PagerStyle-CssClass="pgr" OnPageIndexChanging="gvAt_PageIndexChanging" AllowPaging="True"
                    PageSize="8">
                    <Columns>
                        <asp:BoundField DataField="STT" HeaderText="STT" ReadOnly="True" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Width="5%" />
                        <asp:BoundField DataField="Title" HeaderText="Tiêu đề" ItemStyle-Width="45%" />
                        <asp:BoundField DataField="CategoryName" HeaderText="Danh mục" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Width="30%" />
                        <asp:BoundField DataField="UserName" HeaderText="Người tạo" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Width="15%" />
                        <asp:CheckBoxField DataField="IsHompage" HeaderText="Trang chủ" ItemStyle-HorizontalAlign="Center"
                            ItemStyle-Width="5%" />
                        <asp:TemplateField HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Button runat="server" ID="btnSelect" CommandName="Select" CssClass="button-select"
                                    Text="Chọn" />
                                <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
            </div>--%>
            <div class="pmenu-row-link">
                <dxe:ASPxTextBox runat="server" ID="txtLinkX" ClientInstanceName="txtGetLink" ReadOnly="true"
                    CssClass="link-text">
                </dxe:ASPxTextBox>
            </div>
            <div class="pmenu-row-link">
                <span class="link-right">
                    <asp:Button ID="btChon" runat="server" Text="Chọn" OnClientClick="ReturnToParentPage()"
                        CssClass="menu-link-button" />
                    <asp:Button ID="Button1" runat="server" Text="Hủy" OnClientClick="ReturnToParentPageCancel()"
                        CssClass="menu-link-button" />
                </span>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
